package com.jiashihui.schema_lgorithm.schema.singleton;

/**
 * @author jiashihui
 * @describe: 单例模式 饿汉式
 * @date 2019/02/21
 */
public class Singleton2 {

    // 没有lazy loading的效果，从而降低内存的使用率
    private static Singleton2 singleton = new Singleton2();

    private Singleton2(){
    }

    public static Singleton2 getInstance(){
        return singleton;
    }
}
